package com.lin.cloud.web;

import com.lin.entity.JsonResult;
import com.lin.entity.Student;
import org.springframework.web.bind.annotation.*;

/**
 * @author longyang.lin
 * @description
 * @create 2018年03月21日10:13
 */
@RestController
@RequestMapping("/provider")
public class ProviderController {

    @RequestMapping(value = "/getName/{name}", method = RequestMethod.GET)
    public String getName(@PathVariable String name) {
        return "provider:" + name;
    }

    @PostMapping(value = "/insertStudent")
    public JsonResult insertStudent(@RequestBody Student student) {
        return new JsonResult("200", "请求成功", student);
    }
}
